from ui.plugin_base import PluginBase
from .slacking_off_widget import SlackingOffWidget


class SlackingOffPlugin(PluginBase):
    def __init__(self):
        super().__init__()
        self._widget = None
    
    def get_name(self):
        return "摸鱼盯盘"

    def get_widget(self):
        if self._widget is None:
            self._widget = SlackingOffWidget()
        return self._widget
    
    def cleanup(self):
        """清理资源"""
        if self._widget:
            self._widget.cleanup()